Skip to content

fw(uno): Live migration support for mbor commands - #788

Draft
Wenbo Yuan (wenbo-yuan) wants to merge 2 commits into
mainfrom
wenboy/lm
Draft

Wenbo Yuan (wenbo-yuan) wants to merge 2 commits into
mainfrom
wenboy/lm

Conversation

@wenbo-yuan

Copy link
Copy Markdown
Contributor

Adds Live Migration (LM) support to the uno MBOR path so a partition's session and key state survives a save → restore migration cycle.

Copilot AI balanced review requested due to automatic review settings October 9, 2026 20:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The SQ drain misses queued IIC work, malformed IPC can receive success, and existing partition-store tests no longer build or pass.

4 open findings
What changed in this PR

Adds Uno MBOR live-migration support so partition identity, sessions, and key state can survive save/restore cycles.

Changes:

  • Adds submission-queue management and migration draining.
  • Preserves VM GUID, BK3, and session state across migration.
  • Adds failed session-open/reopen rollback handling.
File Description
fw/​plat/​uno/​fw/​pal/​src/​session.rs Handles migrated and pending session cleanup.
fw/​plat/​uno/​fw/​pal/​src/​part.rs Preserves partition migration state.
fw/​plat/​uno/​fw/​pal/​src/​pal.rs Adds SQ IPC handling and drain accounting.
fw/​plat/​uno/​fw/​pal/​src/​ipc.rs Defines Create/Delete SQ wire messages.
fw/​plat/​uno/​fw/​pal/​src/​io.rs Tracks in-flight queue requests.
fw/​plat/​uno/​fw/​drivers/​session_store/​src/​session_store.rs Adds session backup, restore, and rollback.
fw/​plat/​uno/​fw/​drivers/​part_store/​src/​part_store.rs Updates GUID and sealed-BK3 storage APIs.
fw/​plat/​std/​pal/​src/​session.rs Adds reopen rollback behavior.
fw/​plat/​std/​pal/​src/​drivers/​session.rs Adds session-table rollback.
fw/​pal/​traits/​src/​session.rs Extends the session manager contract.
fw/​core/​lib/​src/​ddi/​mbor/​reopen_session.rs Rolls back failed reopens.
fw/​core/​lib/​src/​ddi/​mbor/​open_session.rs Cleans up failed opens.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread fw/plat/uno/fw/drivers/part_store/src/part_store.rs
Comment thread fw/plat/uno/fw/pal/src/pal.rs
Comment thread fw/plat/uno/fw/pal/src/part.rs
Comment thread fw/plat/uno/fw/pal/src/pal.rs
Add test in uno precheck
Copilot AI balanced review requested due to automatic review settings October 11, 2026 01:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Session rollback misses CQE-delivery failures, rollback errors are discarded, and the new PAL tests are not executed.

4 open findings
2 resolved since last review
Previously missed (2)

In code that hasn't changed since last review

Medium severity Validate CreateDeleteSq request header length

fw/​plat/​uno/​fw/​pal/​src/​ipc.rs:768

This accepts a CreateDeleteSq request without checking the header length. IpcMessageDecoder::decode only verifies the opcode and calls this validator, so an opcode-0x3 slot advertising a length other than 4 can still use stale payload bytes to reset or drain a queue. Reject a mismatched header.length() before inspecting the fields.

Low severity Codec tests are excluded from workspace test execution

fw/​plat/​uno/​fw/​pal/​src/​ipc.rs:992

These tests are not executed by the new workspace test command: fw/plat/uno/fw/pal/Cargo.toml:11 sets test = false for this library target, and cargo test --workspace does not override that. Move the codec tests to a host-testable target/integration crate or enable a host-compatible PAL test target so this new protocol path is actually covered.

🧠 Review effort: Balanced

Comment thread fw/core/lib/src/ddi/mbor/open_session.rs
Comment thread fw/core/lib/src/ddi/mbor/reopen_session.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants